<template>
  <div class="contSty">
    <span @click="handleShow">
      <el-badge class="item"
                :value="num">
        <icon-svg class-name="iconSty"
                  icon-name="dingbudaochu" />
      </el-badge>
    </span>
    <file-export-dialog v-if="visible"
                        :visible.sync="visible" />
  </div>
</template>

<script>
import { mapState } from "vuex";
import FileExportDialog from "./FileExportDialog.vue"
export default {
  name: "FileExport",
  components: { FileExportDialog },
  data () {
    return {
      visible: false
    };
  },
  computed: {
    ...mapState({
      num: (state) => state.login.exportNum || null
    })
  },
  methods: {
    handleShow () {
      // if (this.num) {
      this.visible = true
      // } else {
      //   this.$message({ type: "warning", message: "没有可要导出的数据" });
      // }
    }
  }
};
</script>
<style lang="scss" scoped>
.contSty {
  position: relative;
  margin: 0 40px 0 15px;
  cursor: pointer;
}
.iconSty {
  height: 18px;
  width: 18px;
}
</style>
